import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)
const  routerMap =[
  {path:'/',redirect:'/home'},
  {path:'/login',component:resolve=>require(['../views/login'],resolve)},

  {path:'/home',component:resolve=>require(['../components/home'],resolve),
    children:[
      {path:'/',component:resolve=>require(['../views/readme'],resolve)},
      {path:'/readme',component:resolve=>require(['../views/readme'],resolve)},
      {path:'/basetable',component:resolve=>require(['../views/basetable'],resolve)},

      {path:'/baseform',component:resolve=>require(['../views/baseform'],resolve)},
      {path:'/markdown',component:resolve=>require(['../views/markdown'],resolve)},

      {path:'/basecharts',component:resolve=>require(['../views/basecharts'],resolve)},
      {path:'/user-list',component:resolve=>require(['../views/user-list'],resolve)},

      {path:'/drag',component:resolve=>require(['../views/drag'],resolve)},
      {path:'/vuex',component:resolve=>require(['views/vuex'],resolve)}

    ]
  },
  {path:'/mobile-home',component:resolve=>require(['../views/mobile-home'],resolve)},

  {path:'/jianshu',component:resolve=>require(['../views/jianshu'],resolve)},

  {path:'/layout1',component:resolve=>require(['../views/layout/1'],resolve)},


]

export default new Router({
  routes: routerMap
})
